import Vue from 'vue';
import VueResource from 'vue-resource';
import checkins from './checkins.vue';
import common from "../../assets/js/common.js";

Vue.use(VueResource);

        var backUrl = common.isdev()+"/user/checkLogin.htm";        
        var hrefUrl = window.location.href;        
        if(hrefUrl.indexOf("?userInfo=") > -1){
            backUrl = backUrl + hrefUrl.substring(hrefUrl.indexOf("?userInfo="));
        }

        var promise = Vue.http.post(backUrl).then(function(d) {
            console.info('success');
        }, function(err) {
            console.info('err');
        });
		promise.then(function ( response ) {
            new Vue({
                el: '#app',   
                render: h => h(checkins)
            });
            // 成功回调
        }, function ( response ) {
            new Vue({
                el: '#app',  
                render: h => h(checkins)
            });
        });




